Skip to content

feat(ltx2): LTX-2.3 LoRA support (map gate_logits + prompt_adaln keys, fix example config to 22b)#425

Merged
copybara-service[bot] merged 1 commit into
AI-Hypercomputer:mainfrom
tsvikas:ltx2-3-lora-support
Jun 25, 2026
Merged

feat(ltx2): LTX-2.3 LoRA support (map gate_logits + prompt_adaln keys, fix example config to 22b)#425
copybara-service[bot] merged 1 commit into
AI-Hypercomputer:mainfrom
tsvikas:ltx2-3-lora-support

Conversation

@tsvikas

@tsvikas tsvikas commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds LoRA support for LTX-2.3 (22b) in the LTX-2 pipeline by extending the NNX→Diffusers LoRA key-translation map and clarifying the loader's diagnostics.

  • Map extensions (loaders/lora_conversion_utils.py):
    • to_gate_logits for every attention family: self (attn1), cross (attn2), audio (audio_attn1/audio_attn2), and cross-modal (audio_to_video_attn / video_to_audio_attn).
    • prompt_adaln / audio_prompt_adaln (linear + timestep-embedder) → the model's prompt_adaln_single / audio_prompt_adaln_single.
  • Loader logging/diagnostics (loaders/ltx2_lora_nnx_loader.py), merge behavior unchanged:
    • a missing LoRA weight name returns early with one clear message (was two unclear logs).
    • a missing transformer and a missing connectors each get their own message (the latter had none before).
    • a LoRA carrying keys outside the two routed prefixes (diffusion_model. / text_embedding_projection.) is now warned about. Those keys were previously dropped with no notice.
  • Example config (configs/ltx2_3_video.yml): point the example lora_config at the 22b adapter (colorization IC-LoRA) instead of the prior 19b camera-control entry, which is the wrong model size for the 2.3 base.

Scope & validation

  • All 13 official LTX-2.3-22b IC-LoRAs (plus the Distilled LoRA) load cleanly: every key maps to an emittable model key. Verified by running each LoRA's keys through the translate map; all 13 IC-LoRAs plus the Distilled LoRA were additionally live-fused on the real 22b model (0 unmatched each).
  • pipeline output: A with-LoRA text2video run completes end-to-end on v6e — the colorization IC-LoRA fuses (0 unmatched) and generation produces a video, GEN_EXIT=0. The same generation segfaults at the denoise compile on the v7 host we used — but so does the no-LoRA run there, and the bare config ran clean on a different v7 host, so it's a host-dependent base-pipeline instability (LTX-2.3 pipeline: native SIGSEGVs on tpu7x #423), not the LoRA. (These IC-LoRAs need a vid2vid/reference path for their intended effect, which this repo lacks, so the v6e clip is a valid with-LoRA generation, not a colorization ablation.)

Question for maintainers

Today the loader logs any keys that route to no merge target. Would you prefer it to raise instead (fail loudly on a wrong-prefix / zero-coverage load rather than silently no-op)? Happy to add that if you'd like; left as log-only for now to avoid changing behavior without your call.

🤖 Generated with Claude Code

@google-cla

google-cla Bot commented Jun 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@tsvikas tsvikas changed the title feat(ltx2): LTX-2.3 LoRA support — map gate_logits + prompt_adaln keys, fix example config to 22b feat(ltx2): LTX-2.3 LoRA support (map gate_logits + prompt_adaln keys, fix example config to 22b) Jun 22, 2026
@tsvikas tsvikas force-pushed the ltx2-3-lora-support branch from 6bf1fac to 02b7d54 Compare June 23, 2026 01:15
@tsvikas tsvikas marked this pull request as ready for review June 23, 2026 08:12
@tsvikas tsvikas requested a review from entrpn as a code owner June 23, 2026 08:12
@Perseus14

Copy link
Copy Markdown
Collaborator

Looks good!

Tested on 7x-8 with both single LoRA and multi-LoRA weights and output is generated with no LoRA layers being skipped.

Regarding your query, we can leave it as log, no need to raise/fail.

Please squash your commits

@tsvikas

tsvikas commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks!
I need a passing review to "squash and merge". Alternatively, I can squash locally and force push the branch.

@Perseus14

Copy link
Copy Markdown
Collaborator

Please squash and force push. I will drop the approval after

@tsvikas tsvikas force-pushed the ltx2-3-lora-support branch from 02b7d54 to 74821fc Compare June 24, 2026 08:18
Adds LoRA support for **LTX-2.3 (22b)** in the LTX-2 pipeline by extending the NNX→Diffusers LoRA key-translation map and clarifying the loader's diagnostics.

- Map extensions (`loaders/lora_conversion_utils.py`):
  - `to_gate_logits` for every attention family
  - `prompt_adaln` / `audio_prompt_adaln` → the model's `prompt_adaln_single` / `audio_prompt_adaln_single`.
- Loader logging/diagnostics (`loaders/ltx2_lora_nnx_loader.py`):
  - a missing LoRA weight name returns early with one clear message.
  - a missing `transformer` and a missing `connectors` each get their own message.
  - a LoRA carrying keys outside the two routed prefixes (`diffusion_model.` / `text_embedding_projection.`) is now warned about.
- Example config (`configs/ltx2_3_video.yml`):
  - Point the example `lora_config` at a valid 22b adapter (colorization IC-LoRA) instead of the prior 19b entry.
@tsvikas tsvikas force-pushed the ltx2-3-lora-support branch from 74821fc to 0fbf767 Compare June 24, 2026 08:22
@tsvikas

tsvikas commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

squashed.

@tsvikas

tsvikas commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

seems like Merging is blocked from Error: Unhandled error: HttpError: Resource not accessible by integration, which seems like a hiccup. ?

@Perseus14

Copy link
Copy Markdown
Collaborator

@tsvikas We have a bot that merges the PR once it's approved internally in Google codebase. I have requested the owners to look into this.

@copybara-service copybara-service Bot merged commit eae38c4 into AI-Hypercomputer:main Jun 25, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants